#include <bits/stdc++.h>
using namespace std;
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using ll = long long;
void solve()
{
    string s = "kfdhtshmrw4nxg#f44ehlbn33ccto#mwfn2waebry#3qd1ubwyhcyuavuajb#vyecsycuzsmwp31ipzah#catatja3kaqbcss2th";
    ll n = s.size();
    ll ans = 0;
    set<string> ss;
    bool sz = false, fh = false;
    for (ll i = 0; i < s.size(); i++)
    {
        for (ll j = 8; j <= 16; j++)
        {
            if (i + j - 1 >= n)
                break;
            string sub = s.substr(i, j);
            ll l = i, r = i + j - 1;
            sz = false, fh = false;
            for (ll st = l; st <= r; st++)
            {
                if (s[st] >= '0' && s[st] <= '9')
                {
                    sz = true;
                }
                else if (!(s[st] >= 'a' && s[st] <= 'z'))
                {
                    fh = true;
                }
            }
            if (sz && fh)
                ss.insert(sub);
        } 
    }
    cout << ss.size();
}
int main()
{
    int t = 1;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
